package com.code.day20;

import java.io.FileOutputStream;
import java.io.IOException;

public class Demo02FileOutputStream {
    public static void main(String[] args) throws IOException {
        method1();

    }

    public static void method1() throws IOException {
        FileOutputStream fileOutputStream = new FileOutputStream("D:\\java-code\\java-full-stack\\01-java-base\\src\\com\\code\\day20\\file\\demo2.txt", true);
        fileOutputStream.write("床前明月光\r\n".getBytes());
        fileOutputStream.write("疑是地上霜\r\n".getBytes());
        fileOutputStream.write("举头望明月\n".getBytes());
        fileOutputStream.write("低头思故乡\n".getBytes());
        fileOutputStream.close();
    }


}
